﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Linq;

namespace Arm2015.Test
{
    [TestClass]
    public class Storage
    {
        [TestMethod]
        public void GetContractObjects()
        {
            var contractId = 10;

            var results = Arm2015.Storage.Fact.D_OBJECTS.Where(x => x.C_CONTRACT == contractId);

            Assert.IsTrue(results.Count() > 0);
        }

        [TestMethod]
        public void GetElements()
        {
            var objectId = 10;

            var result = Arm2015.Storage.Fact.D_ELEMENTS.Where(x=>x.C_OBJECT==objectId);
        }

        [TestMethod]
        public void GetObjectElements()
        {
            var objectId = 1;
            var elementId = 19;

            var result = Arm2015.Storage.Fact.D_ELEMENTS.Where(x=>x.C_OBJECT==objectId && x.C_ELEMENT==elementId);
        }
    }
}
